/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package systole.persistence.brokersInterface;

import java.util.List;
import systole.domain.persons.profession.Profession;
import systole.exceptions.ExceptionDAO;

/**
 *
 * @author jmj
 */
public interface ProfessionBroker {


    /**
     * @param profession
     * @throws ExceptionDAO
     */
    public void insert(Profession profession) throws ExceptionDAO;

    /**
     * @param profession
     * @throws ExceptionDAO
     */
    public void update(Profession profession) throws ExceptionDAO;

    /**
     * @return List of profession.
     * @throws ExceptionDAO
     */
    public List<Profession> getAllProfessions() throws ExceptionDAO;

     /**
     *
     * @param name
     * @param id
     * @return if profession exist
     * @throws ExceptionDAO
     */
    public boolean existProfession(String name, Integer id)throws ExceptionDAO;

    /**
     *
     * @param name
     * @return
     * @throws ExceptionDAO
     */
    public Profession getProfessionByName(String name)throws ExceptionDAO;

}
